using System;

namespace SdmxMl.UC
{
	/// <summary>
	/// DualListActionCancelEventArgs used to Cancel or Change a DualList BeforeAction event
	/// </summary>
	public class DualListActionCancelEventArgs : System.ComponentModel.CancelEventArgs
	{
		private DualListAction mAction;
		private Object mItem;

		/// <summary>
		/// Construct a DualListActionCancelEventArgs object giving
		/// the DualList action and the object item.
		/// </summary>
		/// <param name="action">the DualList action</param>
		/// <param name="item">the object item</param>
		public DualListActionCancelEventArgs(DualListAction action, Object item)
		{
			mAction = action;
			mItem = item;
			this.Cancel = false;
		}

		/// <summary>
		/// DualList action.
		/// </summary>
		public virtual DualListAction Action
		{
			get { return mAction; }
		}

		/// <summary>
		/// Object item.
		/// </summary>
		public virtual Object Item
		{
			get { return mItem; }
			set { mItem = value; }
		}
	}
}
